/*
 * ResValue.h
 *
 *  Created on: May 26, 2018
 *      Author: hp
 */

#ifndef RESVALUE_H_
#define RESVALUE_H_

#include <string.h>

#include "android-xml.h"

class ResStringPool;

class ResValue {
public:
	ResValue();
	ResValue(const ResStringPool& string_pool, Res_value value);

	ResValue& operator=(const ResValue& val);
	virtual ~ResValue();

	void set_bool(bool val);
	void set_string(const char* val);
	void set_int(int32_t val);
	void set_float(float val);
	void set_hex(int32_t val);
	void set_reference(uint32_t val);

	const char* to_string();

	Res_value serialize(ResStringPool& stringpool);
private:
	const char* _string = nullptr;
	Res_value _value;
};

#endif /* RESVALUE_H_ */
